package com.wzx.service.impl;

import com.wzx.dao.IPersonDao;
import com.wzx.domain.Person;
import com.wzx.service.IPersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

//类跟接口是实现关系
@Service
public class PersonServiceImpl implements IPersonService {

    //private IPersonDao dao = new PersonDaoImpl();
    @Autowired
    @Qualifier("personDaoImpl")
    private IPersonDao dao;
    @Override
    public boolean login(Person person) {
        //..调用dao方法
       boolean flag =  dao.findByUserNameAndPassword(person);
       return flag;
    }
}
